# -*- coding: utf-8 -*-
# @Time    : 2021/4/27 20:54
# @Author  : Chen
# @Email   : 2356458272@qq.com
# @File    : 02.py
# @Software: PyCharm

import re
# def func1(b):
#     if re.findall(r"\w+.{6,18}",b):
#         return b+"符合"
#     else:
#         return b+"不符合"
a = ["username", "-jriaja"]
# result = map(func1,a)
# print(list(result))

# def func2(b):
#     return re.findall(r"^\w+.{6,18}$",b)
#
# result2 = filter(func2,a)
# print(list(result2))


from functools import reduce
#
# result3 = reduce(lambda a,b:a*b,range(1,4))
# print(result3)

# def func3(a):
#     return a%3==0
# result4 = filter(func3,range(1,101))
# print(list(result4))


# result5 = map(lambda a:a**2,range(1,11))
# print(list(result5))

# b = [1, 4, 5, 9]
# result6 = reduce(lambda x,y:x*10+y,b)
# print(result6)


# list1 = [7, -8, 5, 4, 0, -2, -5]
# print(sorted(list1,reverse=True))
# print(sorted(list1))
# print(sorted(list(filter(lambda a:a<0,list1)),reverse=True))

def func7(a):
    n=0
    for i in range(len(a)):
        if str(a[i]).isdigit():
            if n==0:
                n=i
            elif int(a[i])%2!=0:
                 a.insert(n,a[i])
                 del a[i+1:i+2]
    return a

s = 'asdf234GDSdfd47904sf23'
b=sorted(s,key=ascii)[::-1]
d=func7(b)
print(d)
# d = [1,2,3,45,6,'d']
# print(func7(d))